<script setup>
import { defineProps } from 'vue';

const props = defineProps({
  title: {
    type: String,
    required: true
  },
  description: {
    type: String,
    default: ''
  },
  icon: {
    type: String,
    default: ''
  },
  showIcon: {
    type: Boolean,
    default: true
  }
});
</script>

<template>
  <div class="form-header">
    <div v-if="showIcon && icon" class="header-icon">
      <i :class="icon"></i>
    </div>
    <h2 class="header-title">{{ title }}</h2>
    <p v-if="description" class="header-description">{{ description }}</p>
    <div class="header-divider"></div>
    <slot></slot>
  </div>
</template>

<style scoped>
.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.header-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.header-icon i {
  width: 60px;
  height: 60px;
  background-color: rgba(0, 195, 137, 0.1);
  color: #00c389;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.header-title {
  font-size: 24px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 8px;
}

.header-description {
  font-size: 16px;
  color: #6B7280;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.header-divider {
  width: 60px;
  height: 4px;
  background-color: #00c389;
  border-radius: 2px;
  margin: 0 auto 24px;
}
</style> 